package android.demo.engine.tasks.hardcoded;

import android.content.Context;
import android.content.Intent;
import android.demo.engine.ProcessStateManager;
import android.demo.engine.tasks.ServiceBinderTask;
import android.demo.library.MakeLoanService;
import android.demo.library.model.Library;
import android.widget.Toast;

public class HardCodedServiceBinderTask extends ServiceBinderTask {

	public HardCodedServiceBinderTask(int id) {
		super(id);
	}
	
	@Override
	public Intent getIntent(Context context, ProcessStateManager processState) {
		Intent intent;
			intent = new Intent(context,MakeLoanService.class);
			intent.putExtra(Library.KEY_ID, processState.getLong(Library.KEY_ID));
			Toast.makeText(context, "creating intent with bookId "+ intent.getLongExtra(Library.KEY_ID, -1), Toast.LENGTH_SHORT).show();
		
		return intent;
	}

}
